import 'package:flutter/material.dart';
import 'package:flutter_boost/flutter_boost.dart';

class FlutterRouteWidget extends StatefulWidget {
  final Map params;
  final String message;

  const FlutterRouteWidget({Key key, this.params, this.message}) : super(key: key);

  @override
  _FlutterRouteWidgetState createState() => _FlutterRouteWidgetState();
}

class _FlutterRouteWidgetState extends State<FlutterRouteWidget> {

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text(widget.params['query']),),
      body: Center(
        child: GestureDetector(
          onTap: (){
            FlutterBoost.singleton.open("sample://nativePage", urlParams: <dynamic,dynamic>{"query": {"aaa": "bbb"}});
          },
          child: Container(
            child: Text('toooooNative'),
          ),
        ),
      ),
    );
  }
}
